import 'package:flutter/material.dart';

class Widget_Card_Page extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("Card"),
        ),
        body: Container(
          width: 100.0,
          height: 100.0,
          margin: EdgeInsets.all(20.0),
          child: Card(
            color: Color(0xffff0000),
            child: Text("Card组件"),
            //设置圆角
            shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0)),
            //设置普通边
//            shape: Border.all(
//              color: Color(0xff00ff00),
//              width: 2.0,
//            ),
            elevation: 10.0,
            margin: EdgeInsets.all(10.0),
          ),
        ),
      ),
    );
  }
}

/**
 * 卡片布局，相当于Android中的CardView
 * const Card({
    Key key,
    this.color,//背景色
    this.elevation,//阴影大小
    this.shape,//设置边，可以设置圆角
    this.margin = const EdgeInsets.all(4.0),
    this.clipBehavior = Clip.none,
    this.child,
    this.semanticContainer = true,
    })
 */
